import java.io.InputStream;

import java.net.InetAddress;

import java.net.Socket;




public class test2 {

    public static void main(String[] args) throws Exception{

        Socket client = new Socket(InetAddress.getLocalHost(), 7000);

        InputStream is = client.getInputStream();

        byte[] buf = new byte[1024];

        int len = is.read(buf);

        while (len != -1) {

            System.out.println(new String(buf,0,len));

            len = is.read(buf);

        }




        is.close();

        client.close();




    }

}